/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.简单题.数列求和
 */

class Main {
    public static void main(String[] args) {

        //write your code here........
        long sum = 0;
        long num = 9;
        for(int i = 0; i < 10; i++) {
            sum += num;
            num = num * 10 + 9;
        }
        System.out.print(sum);
    }
}

public class Test {
}
